import util

class Player:
    def __init__(self,name,job):
        self.name = name
        self.job = job
        self.life = 100
        self.exp = 0
        self.level = 1
        self.attack = 0
        self.defense = 0
        self.agile = 0
        self.crite_rate = 0
        self.crite_damage = 0
        util.set_player(self)

    def show(self):
        print("*"*50)
        print(f"{self.name}\t职业:{self.job}")
        print(f"等级:{self.level}\t经验值:{self.exp}\t当前生命:{self.life}")
        print(f"攻击力:{self.attack}\t防御力:{self.defense}\t敏捷:{self.agile}\t暴击率:{self.crite_rate}\t  暴击伤害:{self.crite_damage}")
        print("*" * 50)

class Enemy:
    def __init__(self,name,type):
        self.type = type
        if self.type == '末影龙':
            self.name = name
        else:
            self.name = name+"的"+type
        self.life = 0
        self.exp = 0
        self.attack = 0
        self.defense = 0
        self.agile = 0
        self.crit_rate = 0
        self.crit_damage = 0
        util.set_enemy(self)

    def show(self):
        print("*"*50)
        print(f"{self.name}\t类型:{self.type}")
        print(f"当前生命:{self.life}\t攻击力:{self.attack}\t防御力:{self.defense}\t敏捷:{self.agile}\t暴击率:{self.crit_rate}\t  暴击伤害:{self.crit_damage}")
        print("*" * 50)

if __name__ == '__main__':
    knight = Player("李寻欢","刺客")
    knight.show()
    enemy = Enemy("弱小","僵尸")
    enemy.show()
